/*
 * RGImage.h
 *
 *  Created on: Jan 20, 2014
 *      Author: stepgalvao
 */
#ifndef RGIMAGE_H_
#define RGIMAGE_H_

#include "opencv2/core/core.hpp"
#include "opencv2/opencv.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/nonfree/features2d.hpp"

using namespace cv;
using namespace std;

class RGImage {
	static const int FEATURES_NUM = 2;
	static const double FEATURES_QUALITY = 0.3;
	static const double FEATURES_DST = 10;
	static const double FEATURES_BLOCK_SIZE = 3;
	static const bool SHOW_IMAGES = true;
	static const bool CREATE_FILE = true;
private:
	Mat img, imgThreshold, imgBorder, imgBlur;
	vector<KeyPoint> features;
	vector<KeyPoint> points;
	Size sizeImg;
	Mat ThreSholdImage(Mat img);
	Mat BurnImage(Mat img);
	Mat IdentifyBorder(Mat img);


public:
	RGImage() {
	}
	RGImage(Mat img);
	RGImage(string imgName) :
			RGImage(imread(imgName, 0)) {
	}
	Size GetSize();
	Mat GetImage();
	Mat GetImageThreshold();
	Mat GetImageBorder();
	Mat GetImageBlur();
	Mat GetImageWithBorder();
	vector<KeyPoint> GetFeatures();
	vector<Point2f> GetFeaturesAsPoints();
	static void ShowImage(String nome,Mat img);

};

#endif /* RGIMAGE_H_ */
